package com.itheima_5;

import java.io.*;
import java.net.ServerSocket;
import java.net.Socket;

public class ServerTest {
    public static void main(String[] args) throws IOException {
        ServerSocket ss=new ServerSocket(10001);
        Socket accept = ss.accept();
        BufferedInputStream bis=new BufferedInputStream(accept.getInputStream());
        BufferedWriter bw=new BufferedWriter(new FileWriter("myXML\\as.txt"));
        byte[]bytes=new byte[1024];
        int b;
        while ((b=bis.read())!=-1){
           bw.newLine();
        }
     }
}
